home *** CD-ROM | disk | FTP | other *** search
- /* StartToaster V2.1 -- Have the flyer start up however you like. */
- /* By Bob Caron (Grue) © 1995 NewTek Inc. */
-
- OPTIONS RESULTS
- TOASTERLIB="ToasterARexx.port"
-
- call remlib('rexxsupport.library')
- call addlib("rexxsupport.library", 0,-30,0)
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
-
- if ~exists("toaster:") then do
- say "Start Toaster V2.1"
- say
- say "Your Toaster: assignment is missing, or has been removed."
- say
- say "Some possible solutions:"
- say
- say "1) Reboot your computer and try again."
- say "2) Re-Install your Toaster/Flyer software."
- say " (A minimal install is sufficient.)"
- say
- say "Press <Return> to continue."
- pull stuff
- call quit
- end
-
- if ~exists("toaster:programs/videotoaster") then do
- say "Start Toaster V2.1"
- say
- say "I can't find the program 'VideoToaster' (needed for this software to run)."
- say
- say "Some possible reasons for this failure:"
- say
- say "1) Your toaster: assign may be pointing to the wrong location."
- say "2) You are running ScreamerNet. StartToaster MUST be run before you"
- say " run a ScreamerNet node."
- say "3) Your Toaster software is missing important system files."
- say " Run CheckSoftware to verify."
- say
- say "Press <Return> to continue."
- pull stuff
- call quit
- end
-
- startdir="toaster:arexx/editor/StartUpScripts"
-
- if exists(startdir) then startup=1
- else startup=0
-
- dir=showdir(startdir,'f','*')
- temp=translate(dir,'?',' ','?')
- temp2=translate(temp,' ','*',' ')
- dir = temp2
-
- IF SHOW('Ports','PROJECT_REXX_PORT') THEN
- IF ADDLIB('ToasterARexx.port' , 0) THEN x=Bummer("The Video Toaster/Flyer software is already running!! ")
-
- call pragma("D","toaster:programs")
-
- address command "run >NIL: toaster:programs/videotoaster"
-
- do while ~SHOW('Ports','PROJECT_REXX_PORT')
- address command "c:wait 1"
- end
-
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib('ToasterARexx.port' , 0)
-
- /* Add Startup Code here... */
-
- call set_view(4)
-
- if startup=1 then do
- loopto=words(dir); loop=1
- do while (loop<loopto+1)
- program=translate(word(dir,loop),' ','?')
- filenam=program
- if upper(right(program,5))=".REXX" then
- filenam=left(program,length(filenam)-5)
- if isarexx(startdir||"/"||program) then
- number=LADDTOOL(filenam,startdir||"/"||program||" 1",1)
- if number=12 then break
- loop=loop+1
- end
- end
-
- /* End of code. */
-
- quit:
-
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
- call remlib('rexxsupport.library')
- exit
-
- bummer: /* <- An Arnie like error system */
- parse arg message
- say "Start Toaster V2.1"
- say
- say message
- address command "c:wait 3"
- exit
-
- isarexx:
- parse arg file
- if exists(file) then do
- if open('infile',file,'READ') then do
- filestart = readch('infile',2)
- call close('infile')
- if filestart="/*" then return 1
- end
- end
- return 0
-
- laddtool: procedure
- parse arg filenam,start,number
-
- signal on error
- signal on syntax
-
- call ADDTOOL(filenam,start,number)
-
- syntax:
- error:
-
- signal off error
-
- return rc
-